import request from '/@/utils/request';
export function systemMachineApi() {
	return {
		index: (params) => {
			return request({
				url: '/machine/index',
				method: 'get',
				params
			});
		},
		add: (data) => {
			return request({
				url: '/machine/add',
				method: 'post',
				data,
			});
		},
		edit: (data) => {
			return request({
				url: '/machine/edit',
				method: 'post',
				data,
			});
		},
		del: (data) => {
			return request({
				url: '/machine/del',
				method: 'post',
				data,
			});
		},
		indexAi: () => {
			return request({
				url: 'https://boolsurvey.com/ai-api/tools/getDeviceList',
				method: 'get'
			});
		},
		addAi: (data) => {
			return request({
				url: 'https://boolsurvey.com/ai-api/tools/upload-device',
				method: 'post',
				data,
			});
		},
		delAi: (data) => {
			return request({
				url: 'https://boolsurvey.com/ai-api/tools/device-id',
				method: 'delete',
				data
			});
		},
	};
}